package com.jinlia.show.common.core;

import com.fasterxml.jackson.databind.util.JSONPObject;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.ZoneId;

public class ReaderCity {

    public static void main(String[] args) {
        LocalDateTime specificDateTime = LocalDateTime.of(2023, Month.JUNE, 3, 23, 0);
        LocalDateTime dateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(1717344000000l), ZoneId.systemDefault());
        System.out.println(dateTime);
        System.out.println(specificDateTime.isBefore(dateTime));
    }

    public static void readFileAndPrint(String filePath) {
        try {
            // 创建一个BufferedReader对象，传入文件路径
            BufferedReader reader = new BufferedReader(new FileReader(filePath));

            // 使用readLine()方法逐行读取文件内容
            String line;
            while ((line = reader.readLine()) != null) {
                // 打印每一行内容
                System.out.println(line);
            }

            // 关闭BufferedReader对象
            reader.close();
        } catch (IOException e) {
            // 处理异常
            e.printStackTrace();
        }
    }

}
